package com.example.handle;

import com.event.binlog.iface.IDistributedCacheService;
import com.example.service.IRedisService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

/**
 * @Description 分布式缓存服务
 * @Author Bing
 * @Date 2025/1/20 10:51
 */
@Service
public class DistributedCacheService implements IDistributedCacheService {

    @Resource
    private IRedisService redisService;

    @Override
    public boolean setValue(String key, Object value, int expireTime) {
        redisService.setValue(key, value, expireTime);
        return true;
    }

    @Override
    public boolean setValue(String key, Object value) {
        redisService.setValue(key, value);
        return true;
    }

    @Override
    public Object getValue(String key) {
        return redisService.getValue(key);
    }
}